﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MainManager.master" AutoEventWireup="true" CodeFile="AddEditCanBo.aspx.cs" Inherits="CanBo_AddEditCanBo" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">

    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <div class="row-fluid">
                <div class="span12" id="divMsg" runat="server" visible="false">
                    <div class="alert" id="divAlert" runat="server"></div>
                </div>
            </div>
            <div class="row-fluid">
                <div class="span12">
                    <h3>Thêm / cập nhật thông tin Cán bộ </h3>


                </div>
            </div>
            <div class="row-fluid">
                <div class="span6">
                    <fieldset>
                        <legend>Thông tin cá nhân <small>Những trường có dấu (*) là bắt buộc nhập</small></legend>
                        <asp:ValidationSummary ID="validaSum" runat="server" DisplayMode="BulletList" ShowMessageBox="true" ShowSummary="false" />
                        <div class="form-horizontal">
                            <div class="control-group">
                                <label class="control-label">Họ và tên (*)</label>
                                <div class="controls">
                                    <asp:TextBox ID="txtHoTenCanBo" runat="server" CssClass="input-xlarge"></asp:TextBox>
                                    <asp:RequiredFieldValidator ID="rqHoTenCanBo" runat="server" ControlToValidate="txtHoTenCanBo" ErrorMessage="Họ tên bắt buộc nhập." ForeColor="Red" Display="None"/>
                                </div>
                            </div>
                            <div class="control-group">
                                <label class="control-label" for="ddlGioiTinh">Giới tính</label>
                                <div class="controls radio">

                                    <asp:RadioButtonList ID="rdGioiTinh" runat="server">
                                        <asp:ListItem Value="Nam">Nam</asp:ListItem>
                                        <asp:ListItem Value="Nữ">Nữ</asp:ListItem>
                                    </asp:RadioButtonList>
                                </div>
                            </div>

                            <div class="control-group">
                                <label class="control-label">Ngày sinh (*)</label>
                                <div class="controls">
                                    <asp:TextBox ID="txtNgaySinh" runat="server" CssClass="input-xlarge datepicker"></asp:TextBox>
                                    <asp:RequiredFieldValidator ID="rqNgaySinh" runat="server" ControlToValidate="txtNgaySinh" ErrorMessage="Ngày sinh bắt buộc nhập" ForeColor="Red" Display="None" />
                                </div>
                            </div>
                            <div class="control-group">
                                <label class="control-label">Quê quán (*)</label>
                                <div class="controls">
                                    <asp:TextBox ID="txtQueQuan" TextMode="MultiLine" CssClass="input-xlarge" runat="server"></asp:TextBox>
                                    <asp:RequiredFieldValidator ID="rqQueQuan" runat="server" ControlToValidate="txtQueQuan" ErrorMessage="Quê quán bắt buộc nhập" ForeColor="Red" Display="None" />
                                </div>
                            </div>

                            <div class="control-group">
                                <label class="control-label">Số CMND (*)</label>
                                <div class="controls">
                                    <asp:TextBox ID="txtSoCMND" runat="server" CssClass="input-xlarge"></asp:TextBox>
                                    <asp:RequiredFieldValidator ID="rqSoCMND" runat="server" ControlToValidate="txtSoCMND" ErrorMessage="Số CMND bắt buộc nhập" ForeColor="Red" Display="None" />
                                    <asp:RegularExpressionValidator ID="rgSoCMND" runat="server" ControlToValidate="txtSoCMND" ErrorMessage="Số CMND không hợp lệ" ValidationExpression="[0-9]+"></asp:RegularExpressionValidator>
                                </div>
                            </div>

                            <div class="control-group">
                                <label class="control-label">Số điện thoại</label>
                                <div class="controls">
                                    <asp:TextBox ID="txtSoDienThoai" runat="server" CssClass="input-xlarge"></asp:TextBox>

                                    <asp:RegularExpressionValidator ID="rgSoDienThoai" runat="server" ControlToValidate="txtSoDienThoai" ErrorMessage="Số điện thoại không hợp lệ" ValidationExpression="[0-9]+"></asp:RegularExpressionValidator>

                                </div>
                            </div>
                            
                             <div class="control-group">
                                <label class="control-label">Hộ khẩu thường trú</label>
                                <div class="controls">
                                    <asp:TextBox ID="txtHoKhauThuongTru" TextMode="MultiLine" CssClass="input-xlarge" runat="server"></asp:TextBox>
                                </div>
                            </div>
                            <div class="control-group">
                                <label class="control-label">Nơi ở hiện tại</label>
                                <div class="controls">
                                    <asp:TextBox ID="txtNoiOHienTai" TextMode="MultiLine" CssClass="input-xlarge" runat="server"></asp:TextBox>
                                </div>
                            </div>
                            <div class="control-group">
                                <label class="control-label">Trình độ</label>
                                <div class="controls">
                                     <asp:DropDownList ID="ddlTrinhDo" runat="server" CssClass="input-xlarge" AppendDataBoundItems="true">
                                        <asp:ListItem Value="--Chưa chọn--">-- Chưa chọn --</asp:ListItem>
                                    </asp:DropDownList>
                                </div>
                            </div>
                            <div class="control-group">
                                <label class="control-label">Dân tộc</label>
                                <div class="controls">
                                    <asp:DropDownList ID="ddlDanToc" runat="server" CssClass="input-xlarge" AppendDataBoundItems="true">
                                        <asp:ListItem Value="--Chưa chọn--">-- Chưa chọn --</asp:ListItem>
                                    </asp:DropDownList>
                                </div>
                            </div>

                            <div class="control-group">
                                <label class="control-label">Tôn giáo</label>
                                <div class="controls">
                                     <asp:DropDownList ID="ddlTonGiao" runat="server" CssClass="input-xlarge" AppendDataBoundItems="true">
                                        <asp:ListItem Value="--Chưa chọn--">-- Chưa chọn --</asp:ListItem>
                                    </asp:DropDownList>
                                </div>
                            </div>

                            <div class="control-group">
                                <label class="control-label">Quá trình đào tạo</label>
                                 
                            </div>
                            
                            <div class="control-group">
                                  <asp:TextBox ID="txtQuaTrinhDaoTao" runat="server" TextMode="MultiLine" CssClass="input-xlarge"></asp:TextBox>
                               
                            </div>
                            <div class="control-group">
                                <label class="control-label">Hình đại diện</label>
                                <div class="controls">
                                    <img src="/Images/iconuser.png" id="imgthumb" runat="server" width="160" />
                                    <asp:TextBox ID="txtHinhDaiDien" runat="server" CssClass="input-xlarge" Text="/Images/iconuser.png" />&nbsp;<a id="choosefile">Chọn ảnh</a>
                                </div>
                            </div>

                        </div>
                    </fieldset>
                </div>
                <div class="span6">
                    <fieldset>
                        <legend>Thông tin cán bộ</legend>
                        <div class="form-horizontal">
                            <div class="control-group">
                                <label class="control-label">Loại cán bộ</label>
                                <div class="controls">
                                    <asp:DropDownList ID="ddlLoaiCanBo" runat="server" CssClass="input-xlarge"></asp:DropDownList>
                                </div>
                            </div>
                            <div class="control-group">
                                <label class="control-label">Đơn vị</label>
                                <div class="controls">
                                    <asp:DropDownList ID="ddlDonVi" runat="server" CssClass="input-xlarge"></asp:DropDownList>
                                </div>
                            </div>
                            <div class="control-group">
                                <label class="control-label">Chức vụ</label>
                                <div class="controls checkbox">
                                    <%if (ID > 0)
                                      { %>
                                    <asp:DropDownList ID="ddlChucVu" runat="server" CssClass="input-xlarge"></asp:DropDownList>
                                    <a href="#" title="Thêm" runat="server" id="btnAddChucVu" onserverclick="btnAddChucVu_ServerClick"><i class="icon-plus"></i></a>
                                    <br />
                                    Chức vụ hiện tại:<br />
                                    <ul>
                                        <asp:Repeater ID="rptChucVu" runat="server">
                                            <ItemTemplate>
                                                <li><%#Eval("TenChucVu") %> <a href="#" id="a_<%#Eval("ID") %>" title="Xóa" onclick="return deleteCanBoChucVu(<%=ID %>,<%#Eval("ID") %>)"><i class="icon-remove"></i></a></li>
                                            </ItemTemplate>
                                        </asp:Repeater>

                                    </ul>
                                    <%}
                                      else
                                      { %>
                                    <br />
                                    <asp:CheckBoxList ID="cblChucVu" runat="server" CssClass="checkbox"></asp:CheckBoxList>
                                    <%} %>
                                </div>
                            </div>
                            <div class="control-group">
                                <label class="control-label">Bằng cấp</label>
                                <div class="controls">
                                    <asp:DropDownList ID="ddlBangCap" runat="server" CssClass="input-xlarge"></asp:DropDownList>
                                </div>
                            </div>

                            <div class="control-group">
                                <label class="control-label">Mã ngạch</label>
                                <div class="controls">
                                    <asp:DropDownList ID="ddlMaNgach" runat="server" CssClass="input-xlarge"></asp:DropDownList>
                                </div>
                            </div>
                              <div class="control-group">
                                <label class="control-label">Ngày vào đảng</label>
                                <div class="controls">
                                    <asp:TextBox runat="server" ID="txtNgayVaoDang" CssClass="input-xlarge datepicker"></asp:TextBox>
                                </div>
                            </div>
                            <div class="control-group">
                                <label class="control-label">Hệ số lương</label>
                                <div class="controls">
                                    <asp:TextBox ID="txtHeSoLuong" runat="server" CssClass="input-xlarge"></asp:TextBox>
                                </div>
                            </div>
                            <div class="control-group">
                                <label class="control-label">Tiền bảo hiểm</label>
                                <div class="controls">
                                    <asp:TextBox ID="txtTienBaoHiem" runat="server" CssClass="input-xlarge"></asp:TextBox>
                                </div>
                            </div>
                            <div class="control-group">
                                <label class="control-label">Phụ cấp</label>
                                <div class="controls">
                                    <asp:TextBox ID="txtTienPhuCap" runat="server" CssClass="input-xlarge"></asp:TextBox>
                                </div>
                            </div>
                            <div class="control-group">
                                <div class="controls">

                                    <asp:Button ID="txtSave" runat="server" CssClass="btn btn-large btn-primary" Text="Lưu lại" OnClick="txtSave_Click" />
                                    hoặc <a href="PageCanBo.aspx">Hủy</a>
                                </div>
                            </div>
                        </div>
                    </fieldset>
                </div>
            </div>
            
        </ContentTemplate>
    </asp:UpdatePanel>

</asp:Content>

